MidPop README
Version 1.5 - March 13, 2000
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

What is it?
-----------
MidPop is a small module for Litestep which allows you to use your
middle mouse button to display the popup menu anywhere on the screen.

How do I use it?
----------------
1. Extract MidPop15.ZIP in your Litestep (e.g. C:\LITESTEP) directory.
2. Add this line in your STEP.RC:

     loadModule C:\LITESTEP\MidPop.DLL

3. Recycle LS

Configuration
-------------
Note that these are all optional, but might be useful for fine tuning and
special cases.

First of all, you must add a new section called MidPop in MODULES.INI -
add this line:

  [MidPop]

Below this line you'll add the configuration option(s). Available options
are :

- Delay=nnn
  Default value : 175	
  Set the delay in milliseconds before MidPop decides you want to do 
  something else other than showing the popup. For example if you set
  Delay=500, the popup will only be displayed if you press and release
  the middle button within a half second time period. Normally you 
  would set it to how quickly you can click (i.e. press and release) the
  button. This delay is useful if you also use the middle button for
  scrolling page and prevent the popup from showing unintentionally when
  releasing the button.

- Exclusive=[0|1]
  Default value : 0	
  If set to 0, MidPop will let other programs see that you've clicked the
  middle button, otherwise it won't. Set this to 1 if you use program such
  as Pointix Scroll++ to provide scrolling function using the middle button.
  Leave it to 0 otherwise.

The following options only apply to version 1.5:

First, a word about how MidPop handle exclusion list. On startup, MidPop will
try to read from the file MIDEXC.INI in Litestep directory. This file contains
the exclusion list and is organized in the following format. Note that
anything between < and > are values you must supply:

        [<AppName1>]
        TopWindowClass=<TopWindowClassName1>
        TopWindowTitle=<TopWindowTitleName1>
        WindowClass=<WindowClassName1>

        [<AppName2>]
        TopWindowClass=<TopWindowClassName2>
        TopWindowTitle=<TopWindowTitleName2>
        WindowClass=<WindowClassName2>

For example if you want to exclude Notepad add the following to
MIDEXC.INI and recycle LS:

        [Notepad]
        TopWindowClass=Notepad
        TopWindowTitle=Untitled - Notepad
        WindowClass=Edit

Seems difficult isn't it :-) Don't worry, most of the time you won't have
to type these in manually. In fact the values above is generated automagically
by MidPop, with a little help from you off course. Now to the option that makes
all this possible:

- Learn=[0|1|2]
  Default value : 2
  The Learn option will determine what actually happen if you click the
  middle button. With Learn=1, MidPop will show the popup menu as usual. The
  value 0 and 2 is helpful if you want to create an exclusion list. With
  Learn=0, MidPop will always get a "snapshot" of the window currently under
  the mouse pointer. With Learn=2, MidPop will show the popup menu as usual
  BUT it can also save the "snapshot" if you hold the ALT+SHIFT buttons while
  clicking the middle button. This "snapshot" is saved in the file 
  MIDSNAP.INI in Litestep directory. Every "snapshot" you take will be added
  to this file but be advised that MidPop will recreate this file each time
  it's restarted. The format of MIDSNAP.INI is exactly the same as MIDEXC.INI.
  In fact, for first time creation you can just rename it to MIDEXC.INI,
  recycle LS and you're done.

- Wildcard=^
  Default value : ^
  This option is useful for creating exclusion list for a window that change
  its title dynamically. The simplest example is Notepad, the title consist of
  the name of the document followed by the text "- Notepad". As you may've
  guessed, this title information is stored in the "TopWindowTitle" keyword 
  in MIDEXC.INI. Using the above example, this value is "Untitled - Notepad".
  This works fine if there's no document open in Notepad but, as soon as you
  open, say, STEP.RC, the title will change to "Step.rc - Notepad", so the
  exclusion no longer match, and the popup will be shown when you mid-click
  on it. To take care of this, you must use a wildcard  which defaults to
  the caret (^) character and change MIDEXC.INI to

        [Notepad]
        TopWindowClass=Notepad
        TopWindowTitle=^ - Notepad
        WindowClass=Edit

  This will tell MidPop to look for title that ENDS with " - Notepad". You can
  use this wildcard as a prefix like above, as a suffix or both. To change this
  wildcard character to another character e.g. asterisk, add the option
  Wildcard=* in MODULES.INI

- Win2KAlternate=[0|1]
  Default value = 1
  This option acts as workaround for Windows 2000 and have no effect on other
  version of Windows. Due to the new "feature" in Windows 2000, MidPop cannot
  successfully set the popup as the foreground window. What this means is
  after the popup is shown, you can't dismiss it just by clicking on another
  window. Instead you must click on the popup first, then click on another
  window to close it. This is what happen if you set Win2KAlternate=0. With
  Win2KAlternate=1 however, MidPop will take the extra mile to close the
  popup by itself when you click on another window. The drawback of using
  this method is you cannot use the popup pinning feature. Pinned or not,
  MidPop will close the popup since it has no way of knowing it.

Example:

[MidPop]
Delay=200
Excusive=1
Learn=1
WildCard=~
Win2KAlternate=0

More Info
---------
Here are some important points about MIDEXC.INI:
- Make sure no section has the same name (the value <AppName1> and <AppName2>
  above)
- Not all three keywords (TopWindowClass, TopWindowTitle and WindowClass) are
  required. In particular, WindowClass can sometimes be omitted. This will
  lead to a more "generic" exclusion. For example, with Windows Explorer,
  taking a snapshot of the left and right pane will produce results with
  identical TopWindowClass and TopWindowTitle values but different WindowClass
  value. By omitting WindowClass entirely you can create an exclusion for both
  panes.

Notes
-----
I've only tested this on Win98 SE and Win2000 Pro with build 03-06-2000 of
Litestep. The popup used is LS default and also Re5ource's popup R8. Hope
it works on NT 4 too.

Thanks to all MidPop users for ideas, bug reports and encouragement. Special
thanks to Dan McMullen for help testing it.

Disclaimer
----------
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
OF ANY KIND, EXPRESS OR  IMPLIED yadda yadda yadda. In other
words, use at your own risk, I'm not responsible if it crash
or burn your system (this is not a coffee maker but who knows :-)

Contact
--------
Send comments, bug reports, ideas or just a plain "Hi" to

E-mail  : illusion@cryogen.com (Budyanto Nurhalim / Spectra9)
ICQ UIN : 45687429

--------
Dedicated for 2M, the light of my life. Some dreams just never come true...
